<%@ Page Language="C#" MasterPageFile="~/Employee/Employee.master" AutoEventWireup="true" CodeFile="FeedbackManager.aspx.cs" Inherits="Employee_FeedbackManager" Title="Feedback Manager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <span style="font-size: 32pt"><strong>Feedback Manager<br />
    </strong></span>
    <br />
    <table style="width: 286px">
        <tr>
            <td colspan="4" rowspan="8">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
                    DataKeyNames="CustID" DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Vertical" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px">
                    <Columns>
                        <asp:BoundField DataField="DeliveryNo" HeaderText="DeliveryNo" InsertVisible="False" ReadOnly="True"
                            SortExpression="DeliveryNo" />
                        <asp:BoundField DataField="CustID" HeaderText="CustID" SortExpression="CustID" />
                        <asp:BoundField DataField="Content" HeaderText="Content" SortExpression="Content" />
                        <asp:CheckBoxField DataField="isReplied" HeaderText="isReplied" SortExpression="isReplied" />
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#CCCCCC" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Con %>"
                    SelectCommand="SELECT * FROM [Feedback]" DeleteCommand="DELETE FROM [Feedback] WHERE [DeliveryNo] = @DeliveryNo AND [CustID] = @CustID" InsertCommand="INSERT INTO [Feedback] ([DeliveryNo], [CustID], [Content], [isReplied]) VALUES (@DeliveryNo, @CustID, @Content, @isReplied)" UpdateCommand="UPDATE [Feedback] SET [Content] = @Content, [isReplied] = @isReplied WHERE [DeliveryNo] = @DeliveryNo AND [CustID] = @CustID">
                    <DeleteParameters>
                        <asp:Parameter Name="DeliveryNo" Type="Int32" />
                        <asp:Parameter Name="CustID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Content" Type="String" />
                        <asp:Parameter Name="isReplied" Type="Boolean" />
                        <asp:Parameter Name="DeliveryNo" Type="Int32" />
                        <asp:Parameter Name="CustID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="DeliveryNo" Type="Int32" />
                        <asp:Parameter Name="CustID" Type="Int32" />
                        <asp:Parameter Name="Content" Type="String" />
                        <asp:Parameter Name="isReplied" Type="Boolean" />
                    </InsertParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
        <tr>
        </tr>
    </table>
</asp:Content>

